using Godot;
using System;

public partial class TalkBeforeLevelState : BaseLevelState
{
    TalkBeforeLevel story;
    public override void _Ready()
    {
        base._Ready();
        story = GetNode<TalkBeforeLevel>("TalkBeforeLevel");
        story.OnTalkEnd += OnStoryEndHandler;
    }

    private void OnStoryEndHandler()
    {
        EmitSignal(SignalName.OnStateEnd, this);
    }

    public override void Enter()
    {
        base.Enter();
        story.StartPlay(stateMachime.LevelManager.CurrentEvent.Words);
    }

    public override void Exit()
    {
        base.Exit();
    }
}
